<?php

namespace App\Http\Controllers\Api;


use App\Http\Services\SubjectService;
use Illuminate\Support\Facades\Request;

/**
 * @property SubjectService $subjectService
 */
class SubjectController extends BaseController
{
    public function __construct(SubjectService $subjectService)
    {
        $this->subjectService = $subjectService;
    }

    //
    public function list()
    {
        $result = $this->subjectService->getAllSubjects();
        if (!$result) {
            return $this->fail('获取失败');
        }

        return $this->success($result);
    }
}
